<template>
  <carousel :swiperOption="swiperOption" ref="carousel" :dataList="dataList" v-show="!show"></carousel>
</template>

<script type="text/ecmascript-6">
  import Carousel from '../../base/carousel/carousel.vue'
  export default {
    data() {
      return {
        swiperOption: {
          slidesPerView: 1,
          loop: true,
          centeredSlides: true,
          spaceBetween: 30,
          autoplay: {
            delay: 0
          },
          observer: true, // 修改swiper自己或子元素时，自动初始化swiper
          observeParents: true // 修改swiper的父元素时，自动初始化swiper
        }
      }
    },
    deactivated() {
      this.$refs.carousel.showSwiper = false
    },
    props: {
      show: Boolean,
      dataList: Array
    },
    components: {
      Carousel
    }
  }
</script>

<style>

</style>
